package com.wx.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.wx.entity.SysWxuser;
import com.wx.service.SysWxTokenService;
import com.wx.service.SysWxuserService;
import com.wx.service.WxInterfaceService;

@Service
public class WxInterfaceServiceImpl implements WxInterfaceService {
	

	@Resource
	private SysWxuserService sysWxuserService;

	@Resource
	private SysWxTokenService sysWxTokenService;

	private String getToken(String wxid){
		if(wxid==null || wxid.isEmpty()){
			return null;
		}
		SysWxuser user = sysWxuserService.selectByWxid(wxid);
		String token = sysWxTokenService.getAccessToken(user);
		return token;
	}
	
	
	
}
